package com.v5ba.server;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * @author yiren
 * @date 2018-08-21
 */
@Data
@ConfigurationProperties(MQConstant.YML_ROOT_PREFIX)
public class RocketmqProperties {
    private String namesrvAddr;
    private Producer producer;
    private Consumer consumer;
    public static class Producer {
        private boolean enable = true;

        public boolean isEnable() {
            return enable;
        }

        public void setEnable(boolean enable) {
            this.enable = enable;
        }
    }
    public static class Consumer {
        private boolean enable;
        private String topicOrderly = "";
        private String topicConcurrently = "";


        public boolean isEnable() {
            return enable;
        }

        public void setEnable(boolean enable) {
            this.enable = enable;
        }

        public String getTopicOrderly() {
            return topicOrderly;
        }

        public void setTopicOrderly(String topicOrderly) {
            this.topicOrderly = topicOrderly;
        }

        public String getTopicConcurrently() {
            return topicConcurrently;
        }

        public void setTopicConcurrently(String topicConcurrently) {
            this.topicConcurrently = topicConcurrently;
        }
    }


    public String getNamesrvAddr() {
        return namesrvAddr;
    }

    public void setNamesrvAddr(String namesrvAddr) {
        this.namesrvAddr = namesrvAddr;
    }

    public Producer getProducer() {
        return producer;
    }

    public void setProducer(Producer producer) {
        this.producer = producer;
    }

    public Consumer getConsumer() {
        return consumer;
    }

    public void setConsumer(Consumer consumer) {
        this.consumer = consumer;
    }
}